package cn.johnyu.mapper;

import cn.johnyu.pojo.OrderPo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface OrderMapper {
    @Select("select id,user_id as aid,product_id as pid,pay_amount as amount from orders")
    List<OrderPo> findAllOrder();//PO: 持久化对象


    @Select("select id,user_id as aid,product_id as pid,pay_amount as amount from orders where id=#{id}")
    OrderPo loadOrder(int id);
}
